﻿<%@ Reference Page="StartExamfra.aspx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StartExamfra_top.aspx.cs" Inherits="greenbelt.mystudy_Study_TopMenu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />

</head>
<body >
    <form id="form1" runat="server">
    <div>
    <table>
            <tr>
    <td width="54" height="27" background="../images/di_mail03.gif"><img src="../images/sxj.gif" width="54" height="27"></td>
    <td background="../images/di_mail03.gif" style="width: 153px">
        &nbsp;<img src="../images/ycjypt.gif" width="128" height="27">
    </td>
                <td background="../images/di_mail03.gif" width="732" style="text-align: left">
                    <strong><span style="color: #ffffff"></span></strong>
                    <strong><span
                        style="color: #ffffff"> 
        <asp:Label ID="Label1" runat="server" Font-Size="Small">课程编号</asp:Label>
                        <asp:Label ID="lblid" runat="server" Text="lblid" Width="33px"></asp:Label>
                        <asp:Label ID="Label5" runat="server" Font-Bold="True"
                Font-Size="Small" Text="课程名称"></asp:Label>
                        <asp:Label ID="lblname" runat="server" Text="lblname" Width="201px"></asp:Label>
        <asp:Label ID="Label3" runat="server" Font-Size="9pt" Height="15px" Text="测试时间："
            Width="79px"></asp:Label><asp:Label ID="lblshijian" runat="server" Font-Size="9pt" ForeColor="Red"
                Text="20分钟"></asp:Label><asp:Label ID="Label7" runat="server" Font-Size="9pt" Text="计时："
                    Width="49px"></asp:Label><asp:TextBox ID="time" runat="server" Enabled="False"
                        Font-Size="9pt" Height="18px" Width="66px">00:00</asp:TextBox></span></strong></td>
            </tr>
        </table>
    </div>
        &nbsp;
        <asp:Label ID="lbltaoti" runat="server" Text="lbltaoti" Width="172px"></asp:Label>&nbsp;&nbsp;
        <asp:TextBox ID="txttest" runat="server"></asp:TextBox>&nbsp;
        <asp:Button ID="Button1" runat="server" Text="时间到" OnClick="Button1_Click" />
    </form>
</body>
</html>
    <script type="text/javascript">
          var settime=60*document.forms[0].txttest.value
          var i;
          var showthis;
          var sec=59
          var min=document.forms[0].txttest.value-1
          for(i=settime;i>=0;i--)   {
            
             setTimeout("update()",i*1000);
          }
          function update() {
            sec--
            if(sec==-1)
            {
                sec=59
                min--
            }  
            document.forms[0].time.value=min+":"+sec
            if(min==2&&sec==0) 
            {
                alert("自我测试即将结束,请抓紧答卷")
            }
            if(min==0&&sec==0) 
            {
                alert("自我测试时间到,请交卷")
                parent.frames.bottom.frames.document.all.btnSubmit.click()

            }
          }

        
        
        </script>